<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>设置管理员Token</title>
</head>
<body>
    <h1>正在设置管理员登录状态...</h1>
    <p id="status">请稍候...</p>

    <script>
        // 设置管理员token
        const adminToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImRlYnVnLXVzZXIiLCJlbWFpbCI6ImRlYnVnQGV4YW1wbGUuY29tIiwicm9sZSI6ImFkbWluIiwiaWF0IjoxNzU3MTM1Mzc3LCJleHAiOjE3NTcyMjE3Nzd9.xZDbSHEXTfn0eJ3Pb0Uw9QgsGaULpZIIq6__4tufng0';
        
        try {
            localStorage.setItem('admin_token', adminToken);
            document.getElementById('status').innerHTML = '✅ 管理员token已设置成功！<br><br><a href="/menu">点击进入菜单页面</a>';
            
            // 3秒后自动跳转
            setTimeout(() => {
                window.location.href = '/menu';
            }, 3000);
        } catch (error) {
            document.getElementById('status').innerHTML = '❌ 设置token失败: ' + error.message;
        }
    </script>
</body>
</html>